package com.xbj.cloud.voaMeeting;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication
@EnableDiscoveryClient //从Spring Cloud的Dalston版本之后（不含Dalston），只要开启了Spring Boot的自动配置，服务注册发现功能就会默认启用
@ImportResource("classpath:all.xml")
public class VoaMeetingApplication {

    private static final Logger LOG = LoggerFactory.getLogger(VoaMeetingApplication.class);
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(VoaMeetingApplication.class);
        String[] activeProfiles = applicationContext.getEnvironment().getActiveProfiles();
        LOG.info("voa-meeting:8094 启动成功");
        for (String profile :activeProfiles) {
            LOG.info("当前使用的profile:"+profile);
        }
    }
}
